const express = require("express");
const userHandler = require("../router_handler/user");

const router = express.Router();

const userLimit = require("../limit/user");
const expressJoi = require("@escook/express-joi");

router.get("/getInfo", userHandler.getUserinfo);
router.post("/bindAccount", userHandler.bindAccount);
router.post("/changePassword", expressJoi(userLimit.changePassword_limit), userHandler.changePassword);
router.post("/changeEmail", expressJoi(userLimit.email_limit), userHandler.changeEmail);
router.post("/changeSex", userHandler.changeSex);
router.post("/changeNickname", expressJoi(userLimit.nickname_limit), userHandler.changeNickname);

module.exports = router;
